<?php

namespace app\common\library;

use addons\wxo\library\Wechat as WechatLibrary;

class WxTemp
{
    public static function remind($data)
    {
        $wechat = new WechatLibrary();
        $app = $wechat->getApp();
        $app->template_message->send([
            'touser' => $data['openid'],
            'template_id' => '14InOaWJlu94ek_wV6mmnoMFK209WAVJat4-4JS6nF0',
            'data' => [
                'first' => '您好，马上到站了',
                'keyword1'  => '5号线',
                'keyword2'  => $data['zhandian'],
                'keyword3'  => date('H:i:s', time()),
                'remark' => '请做好下车准备',
            ],
        ]);
    }
}